playStopped
Type
message
Summary
Sent to a player when it stops playing.
Syntax
playStopped
Description
Handle the playStopped message if you want to perform a task when a movie or sound finishes playing.
The playStopped message is sent when the movie or sound reaches its end when playing forwards, the movie or sound reaches its beginning if it is playing backwards, or when a play stop command executes. If the user pauses the movie or sound, the playPaused message is sent instead.
When an audio clip or video clip is playing, a temporary player is created for it. When the clip is finished, the playStopped message is sent to it.
The playStopped message is sent when a card containing the player closes and when the player's filename is changed. If the player is hidden, or the movie or sound is not currently running, the message will still be sent. To prevent a playStopped handler from being executed inappropriately, set the lockMessages to true before changing the filename or switching cards:
lock messages -- prevent sending playStopped
set the filename of me to newFile
unlock messages
Examples
on playStopped
hide the target
show button "Start Playing"
end playStopped
Related
property: filename, lockMessages, filename
glossary: handler, player, message, command, execute
message: playPaused
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
Platforms
desktop
server